home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn RISC PD-CD 1
/
Acorn RISC PD-CD 1.iso
/
languages
/
dde
/
_pc
/
h
/
fontlist
< prev
next >
Wrap
Text File
|
1992-02-09
|
2KB
|
75 lines
(*
* Title: fontlist.h
* Purpose: Routines to enumerate the fonts on the system into a tree structure
*
*)
#ifndef __fontlist_h
#define __fontlist_h
(* -------------------------------------------------- *)
(* Structures required *)
(* -------------------------------------------------- *)
type fontlist_node_ptr = ^fontlist_node;
fontlist_node =
record
name : packed array[1..39] of char;
son : fontlist_node_ptr;
brother : fontlist_node_ptr;
flag : integer
end;
(* As an example of a font tree structure, consider
Corpus.Medium, Corpus.Bold, Selwyn,
Trinity.Medium, Trinity.Bold, Trinity.Medium.Italic,
Widget.Medium.Italic.Outline
This will be stored in the following way: (#'s denote flag's which are TRUE)
--+--> Corpus --+--> # Medium
| |
| +--> # Bold
|
+--> # Selwyn
|
+--> Trinity --+--> # Medium -----> # Italic
| |
| +--> # Bold
|
+--> Widget --+--> Medium -----> # Italic.Outline
[ Brothers are connected vertically downwars, sons to their parents
right-to-left ]
*)
(* -------------------------------------------------- *)
(* Globals defined *)
(* -------------------------------------------------- *)
var font_tree : fontlist_node_ptr; extern;
(* ------------------------ fontlist_list_all_fonts ------------------------
* Description: Read in the font list into a font tree
*
* Parameters: BOOL system -- TRUE if System font should be included in
* the list
* Returns: a pointer to the start of the font tree
* Other Info:
*)
function fontlist_list_all_fonts(system : boolean)
: fontlist_node_ptr; extern;
(* ------------------------ fontlist_free_font_tree ------------------------
* Description: Free a font tree
*
* Parameters: fontlist_node *font_tree -- the font tree to free
* Returns:
* Other Info:
*)
procedure fontlist_free_font_tree(font_tree : fontlist_node_ptr); extern;
#endif
(* end fontlist.h *)